<template>
        <div class="introduction">
            <div class="top">
                <img src="../assets/image/avatar.jpg" alt="">
            </div>
            <div class="center">
                <div class="title">
                    拾记博客
                </div>
            </div>
            <div class="bottom">
                <router-link class="item" :to="{name:'archive'}">
                    <div class="name">文章</div>
                    <div class="num">{{info["article_num"]}}</div>
                </router-link>
                <router-link class="item" :to="{name:'class'}">
                    <div class="name">分类</div>
                    <div class="num">{{info["class_num"] }}</div>
                </router-link>
                <router-link class="item"  :to="{name:'tab'}">
                    <div class="name">标签</div>
                    <div class="num">{{info["tag_num"]}}</div>
                </router-link>
            </div>
        </div>
</template>

<script>
import { mapState } from "vuex";

export default {
  computed:mapState({
    info:state=>state.info
  })
}
</script>

<style lang="scss" scoped>
.introduction{
    background-color: #fff;
    box-shadow: var(--box-shadow);
    border-radius:var(--radius);
    padding: 24px 20px;
    .top{
        width: 110px;
        height: 130px;
        margin: auto;
        padding: 10px 0;
        img{
            width: 100%;
            height: 100%;
            border-radius: 50%;
            transition: transform 1s;
            &:hover{
                transform: rotate(360deg);
            }
        }
    }
    .center{
        .title{
            padding: 10px 0;
            margin: 0 auto;
            font-size: 22px;
            text-align: center;
        }
    }
    .bottom{
        display: flex;
        .item{
            color: #333;
            flex: 1;
            text-align: center;
            .name{
                line-height: 20px;
            }
            .num{
                font-size: 20px;
                line-height: 30px;
            }
        }
    }
}
</style>